//
//  eHealth.swift
//  eHealth
//
//  Created by QFX on 2023/11/1.
//

import UIKit

class eHealth: VHLSQLiteObject {
    required public init() {

    }
    public var pkid: Int?
    public var Food: String?
    public var Serving: String?
    public var Calories: String?
}


// 根据条件查询骑行记录数据
extension eHealth {
 
    static func getHealth(Food:String) -> [eHealth]? {
        if let rows = try? eHealth.rows(filter: "Food LIKE '\(Food)%'") {
            return rows
        }
        return []
    }
    
    static func getHealths() -> [eHealth]? {
        if let rows = try? eHealth.rows() {
            return rows
        }
        return nil
     }
}
